package com.lzj.demo.design.chain.fzw.chain;

import java.util.Date;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 模拟审批服务
 * */
public class AuthService {

    private static final Map<String, Date> authMap = new ConcurrentHashMap<>();

    /**
     * 查询审批结果
     * @param uId 审批人id
     * @param orderId 审批单子id
     * */
    public static Date queryAuthInfo(String uId,String orderId){
        return authMap.get(uId.concat(orderId));
    }

    //处理审批
    public static void auth(String uId,String orderId){
        authMap.put(uId.concat(orderId),new Date());
    }
}
